package com.sangmo.fts.common.authority.meta;

import com.sangmo.fts.common.authority.Rights;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@Documented
@Inherited
@Repeatable(value = AuthorityCheckAnns.class)
public @interface AuthorityCheckAnn {
    String name() default "";
    String dependsOn() default "";
    Class resource();
    String indicator() default "id";
    Class authorityClass() default Void.class;
    String authorityIndicator() default "";
    int expectedRight() default Rights.READ;
}
